/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import {HasProperty} from './hamcrest/beans/HasProperty.js'
import {CharSequenceLength} from './hamcrest/text/CharSequenceLength.js'
import {AnyOf} from './hamcrest/core/AnyOf.js'
import {IsBlankString} from './hamcrest/text/IsBlankString.js'
import {IsEqualIgnoringCase} from './hamcrest/text/IsEqualIgnoringCase.js'
import {StringContains} from './hamcrest/core/StringContains.js'
import {StringEndsWith} from './hamcrest/core/StringEndsWith.js'
import {StringStartsWith} from './hamcrest/core/StringStartsWith.js'
import {AllOf} from './hamcrest/core/AllOf.js'
import {IsEqual} from './hamcrest/core/IsEqual.js'
import {IsNaN} from './hamcrest/number/IsNaN.js'
import {OrderingComparison} from './hamcrest/number/OrderingComparison.js'
import {IsCloseTo} from './hamcrest/number/IsCloseTo.js'
import { IsNull } from './hamcrest/core/IsNull.js'
import {IsNot} from './hamcrest/core/IsNot.js'
import {Is} from './hamcrest/core/Is.js'
import {IsArray} from './hamcrest/collection/IsArray.js'
import {IsIn} from './hamcrest/collection/IsIn.js'
import {Every} from './hamcrest/core/Every.js'
import {MatchesPattern} from './hamcrest/text/MatchesPattern.js'
import {IsEqualCompressingWhiteSpace} from './hamcrest/text/IsEqualCompressingWhiteSpace.js'
import {IsSame} from './hamcrest/core/IsSame.js'
import {IsIterableContaining} from './hamcrest/core/IsIterableContaining.js'
import {IsEmptyString} from './hamcrest/text/IsEmptyString.js'
import {ArrayMatching} from './hamcrest/collection/ArrayMatching.js'
import {IsAnything} from './hamcrest/core/IsAnything.js'
import {IsInstanceOf} from './hamcrest/core/IsInstanceOf.js'



const runCount = 150000;
const runCount_short = 10000;

class Student {
    name;
    age;
    grade;
    sex;
    constructor(name,age, grade, sex) {
        this.name = name;
        this.age = age;
        this.grade = grade;
        this.sex = sex;
    }
}

/**
 * HasProperty
 * hasProperty
*/
function notNullValue_matches_Test() {
    let matcher = IsNull.notNullValue() 
    let str = "Every morning, she walks through the quiet park, enjoying the serene beauty of nature as the sun rises."
    let result
    let startTime = getDate()
    for (let i = 0; i < runCount; i++) {
        result = matcher.matches(str)
    }
    let endTime = getDate()
    if (result !== true) {
        throw new Error('hamcrest_notNullValue_matches error')
    }
    print(`hamcrest_notNullValue_matches: ${endTime - startTime} ms`)
}

function getDate() {
    return Date.now()
}

function runAllTest() {
    notNullValue_matches_Test()
}

runAllTest()